/*

Author   : chaos

FileName : ptr_ptr.cpp

Date     : 07/08/17 23:38:59

*/
#include <iostream>
using namespace std;

int main(void)
{
    int value = 2 ;
    int *ptr_to_int = &value;
    int **ptr_to_ptr = &ptr_to_int;

    cout << "Name\t\t|Address\t|Value\t\t|"
        "* of Value\t|** of value" << endl;
    cout << "-----------------------------------"
        "-------------------------------" << endl;

    cout << "ptr_to_ptr\t|" << &ptr_to_ptr <<"\t|" <<ptr_to_ptr
        <<"\t|" << *ptr_to_ptr <<"\t|" << **ptr_to_ptr << endl;

    cout << "ptr_to_int\t|" << &ptr_to_int <<"\t|" <<ptr_to_int
        << "\t|" << *ptr_to_int << endl;

    cout << "vlue\t\t|" << &value << "\t|" << value << endl;

    return 0;
}
